package com.xiaomimall.back.user;

import com.xiaomi.back.dao.user.UserBackDao;
import com.xiaomi.pojo.User;
import com.xiaomi.util.Todaytime;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class BackUser {
    private ApplicationContext context ;

    @Before
    public void init() {
        context = new ClassPathXmlApplicationContext("spring-config-all.xml") ;
    }
    @Test
    public void BackUser() {
        String time= Todaytime.Todaytime();
        List<User> userList=context.getBean(UserBackDao.class).LoginCount(time);
        System.out.println(userList.toString());
    }
}
